#pragma once
// MESSAGE XAP_COLLABORATOR_UGV_PVA_INFO PACKING

#define MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO 20204


typedef struct __mavlink_xap_collaborator_ugv_pva_info_t {
 uint32_t time_boot_ms; /*< [ms] Timestamp (milliseconds since system boot)*/
 int32_t latitude; /*<   Latitude, 1e7 deg, WGS-84. */
 int32_t longitude; /*<   Longitude, 1e7 deg, WGS-84. */
 int32_t altitude; /*<   Altitude, 1e3 m, WGS-84. */
 float velN; /*<   North speed, m/s. */
 float velE; /*<   East speed, m/s. */
 float velD; /*<   Down speed, m/s. */
 float roll; /*<   Roll angle, rad. */
 float pitch; /*<   Pitch angle, rad. */
 float yaw; /*<   Yaw angle `(heading), rad. */
 uint8_t ID; /*<   UGV ID. */
 uint8_t poseValid; /*<   The sign of position info valid. */
 uint8_t velValid; /*<   The sign of velocity info valid. */
 uint8_t attValid; /*<   The sign of attitude info valid. */
 uint8_t isTarget; /*<   The sign of target. */
} mavlink_xap_collaborator_ugv_pva_info_t;

#define MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_LEN 45
#define MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_MIN_LEN 45
#define MAVLINK_MSG_ID_20204_LEN 45
#define MAVLINK_MSG_ID_20204_MIN_LEN 45

#define MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_CRC 42
#define MAVLINK_MSG_ID_20204_CRC 42



#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_XAP_COLLABORATOR_UGV_PVA_INFO { \
    20204, \
    "XAP_COLLABORATOR_UGV_PVA_INFO", \
    15, \
    {  { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, time_boot_ms) }, \
         { "ID", NULL, MAVLINK_TYPE_UINT8_T, 0, 40, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, ID) }, \
         { "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, latitude) }, \
         { "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, longitude) }, \
         { "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, altitude) }, \
         { "velN", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, velN) }, \
         { "velE", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, velE) }, \
         { "velD", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, velD) }, \
         { "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, roll) }, \
         { "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, pitch) }, \
         { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, yaw) }, \
         { "poseValid", NULL, MAVLINK_TYPE_UINT8_T, 0, 41, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, poseValid) }, \
         { "velValid", NULL, MAVLINK_TYPE_UINT8_T, 0, 42, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, velValid) }, \
         { "attValid", NULL, MAVLINK_TYPE_UINT8_T, 0, 43, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, attValid) }, \
         { "isTarget", NULL, MAVLINK_TYPE_UINT8_T, 0, 44, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, isTarget) }, \
         } \
}
#else
#define MAVLINK_MESSAGE_INFO_XAP_COLLABORATOR_UGV_PVA_INFO { \
    "XAP_COLLABORATOR_UGV_PVA_INFO", \
    15, \
    {  { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, time_boot_ms) }, \
         { "ID", NULL, MAVLINK_TYPE_UINT8_T, 0, 40, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, ID) }, \
         { "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, latitude) }, \
         { "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, longitude) }, \
         { "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, altitude) }, \
         { "velN", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, velN) }, \
         { "velE", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, velE) }, \
         { "velD", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, velD) }, \
         { "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, roll) }, \
         { "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, pitch) }, \
         { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, yaw) }, \
         { "poseValid", NULL, MAVLINK_TYPE_UINT8_T, 0, 41, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, poseValid) }, \
         { "velValid", NULL, MAVLINK_TYPE_UINT8_T, 0, 42, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, velValid) }, \
         { "attValid", NULL, MAVLINK_TYPE_UINT8_T, 0, 43, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, attValid) }, \
         { "isTarget", NULL, MAVLINK_TYPE_UINT8_T, 0, 44, offsetof(mavlink_xap_collaborator_ugv_pva_info_t, isTarget) }, \
         } \
}
#endif

/**
 * @brief Pack a xap_collaborator_ugv_pva_info message
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 *
 * @param time_boot_ms [ms] Timestamp (milliseconds since system boot)
 * @param ID   UGV ID. 
 * @param latitude   Latitude, 1e7 deg, WGS-84. 
 * @param longitude   Longitude, 1e7 deg, WGS-84. 
 * @param altitude   Altitude, 1e3 m, WGS-84. 
 * @param velN   North speed, m/s. 
 * @param velE   East speed, m/s. 
 * @param velD   Down speed, m/s. 
 * @param roll   Roll angle, rad. 
 * @param pitch   Pitch angle, rad. 
 * @param yaw   Yaw angle `(heading), rad. 
 * @param poseValid   The sign of position info valid. 
 * @param velValid   The sign of velocity info valid. 
 * @param attValid   The sign of attitude info valid. 
 * @param isTarget   The sign of target. 
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_xap_collaborator_ugv_pva_info_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
                               uint32_t time_boot_ms, uint8_t ID, int32_t latitude, int32_t longitude, int32_t altitude, float velN, float velE, float velD, float roll, float pitch, float yaw, uint8_t poseValid, uint8_t velValid, uint8_t attValid, uint8_t isTarget)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_LEN];
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_int32_t(buf, 4, latitude);
    _mav_put_int32_t(buf, 8, longitude);
    _mav_put_int32_t(buf, 12, altitude);
    _mav_put_float(buf, 16, velN);
    _mav_put_float(buf, 20, velE);
    _mav_put_float(buf, 24, velD);
    _mav_put_float(buf, 28, roll);
    _mav_put_float(buf, 32, pitch);
    _mav_put_float(buf, 36, yaw);
    _mav_put_uint8_t(buf, 40, ID);
    _mav_put_uint8_t(buf, 41, poseValid);
    _mav_put_uint8_t(buf, 42, velValid);
    _mav_put_uint8_t(buf, 43, attValid);
    _mav_put_uint8_t(buf, 44, isTarget);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_LEN);
#else
    mavlink_xap_collaborator_ugv_pva_info_t packet;
    packet.time_boot_ms = time_boot_ms;
    packet.latitude = latitude;
    packet.longitude = longitude;
    packet.altitude = altitude;
    packet.velN = velN;
    packet.velE = velE;
    packet.velD = velD;
    packet.roll = roll;
    packet.pitch = pitch;
    packet.yaw = yaw;
    packet.ID = ID;
    packet.poseValid = poseValid;
    packet.velValid = velValid;
    packet.attValid = attValid;
    packet.isTarget = isTarget;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO;
    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_MIN_LEN, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_LEN, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_CRC);
}

/**
 * @brief Pack a xap_collaborator_ugv_pva_info message on a channel
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param time_boot_ms [ms] Timestamp (milliseconds since system boot)
 * @param ID   UGV ID. 
 * @param latitude   Latitude, 1e7 deg, WGS-84. 
 * @param longitude   Longitude, 1e7 deg, WGS-84. 
 * @param altitude   Altitude, 1e3 m, WGS-84. 
 * @param velN   North speed, m/s. 
 * @param velE   East speed, m/s. 
 * @param velD   Down speed, m/s. 
 * @param roll   Roll angle, rad. 
 * @param pitch   Pitch angle, rad. 
 * @param yaw   Yaw angle `(heading), rad. 
 * @param poseValid   The sign of position info valid. 
 * @param velValid   The sign of velocity info valid. 
 * @param attValid   The sign of attitude info valid. 
 * @param isTarget   The sign of target. 
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_xap_collaborator_ugv_pva_info_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
                               mavlink_message_t* msg,
                                   uint32_t time_boot_ms,uint8_t ID,int32_t latitude,int32_t longitude,int32_t altitude,float velN,float velE,float velD,float roll,float pitch,float yaw,uint8_t poseValid,uint8_t velValid,uint8_t attValid,uint8_t isTarget)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_LEN];
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_int32_t(buf, 4, latitude);
    _mav_put_int32_t(buf, 8, longitude);
    _mav_put_int32_t(buf, 12, altitude);
    _mav_put_float(buf, 16, velN);
    _mav_put_float(buf, 20, velE);
    _mav_put_float(buf, 24, velD);
    _mav_put_float(buf, 28, roll);
    _mav_put_float(buf, 32, pitch);
    _mav_put_float(buf, 36, yaw);
    _mav_put_uint8_t(buf, 40, ID);
    _mav_put_uint8_t(buf, 41, poseValid);
    _mav_put_uint8_t(buf, 42, velValid);
    _mav_put_uint8_t(buf, 43, attValid);
    _mav_put_uint8_t(buf, 44, isTarget);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_LEN);
#else
    mavlink_xap_collaborator_ugv_pva_info_t packet;
    packet.time_boot_ms = time_boot_ms;
    packet.latitude = latitude;
    packet.longitude = longitude;
    packet.altitude = altitude;
    packet.velN = velN;
    packet.velE = velE;
    packet.velD = velD;
    packet.roll = roll;
    packet.pitch = pitch;
    packet.yaw = yaw;
    packet.ID = ID;
    packet.poseValid = poseValid;
    packet.velValid = velValid;
    packet.attValid = attValid;
    packet.isTarget = isTarget;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO;
    return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_MIN_LEN, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_LEN, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_CRC);
}

/**
 * @brief Encode a xap_collaborator_ugv_pva_info struct
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 * @param xap_collaborator_ugv_pva_info C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_xap_collaborator_ugv_pva_info_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_xap_collaborator_ugv_pva_info_t* xap_collaborator_ugv_pva_info)
{
    return mavlink_msg_xap_collaborator_ugv_pva_info_pack(system_id, component_id, msg, xap_collaborator_ugv_pva_info->time_boot_ms, xap_collaborator_ugv_pva_info->ID, xap_collaborator_ugv_pva_info->latitude, xap_collaborator_ugv_pva_info->longitude, xap_collaborator_ugv_pva_info->altitude, xap_collaborator_ugv_pva_info->velN, xap_collaborator_ugv_pva_info->velE, xap_collaborator_ugv_pva_info->velD, xap_collaborator_ugv_pva_info->roll, xap_collaborator_ugv_pva_info->pitch, xap_collaborator_ugv_pva_info->yaw, xap_collaborator_ugv_pva_info->poseValid, xap_collaborator_ugv_pva_info->velValid, xap_collaborator_ugv_pva_info->attValid, xap_collaborator_ugv_pva_info->isTarget);
}

/**
 * @brief Encode a xap_collaborator_ugv_pva_info struct on a channel
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param xap_collaborator_ugv_pva_info C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_xap_collaborator_ugv_pva_info_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_xap_collaborator_ugv_pva_info_t* xap_collaborator_ugv_pva_info)
{
    return mavlink_msg_xap_collaborator_ugv_pva_info_pack_chan(system_id, component_id, chan, msg, xap_collaborator_ugv_pva_info->time_boot_ms, xap_collaborator_ugv_pva_info->ID, xap_collaborator_ugv_pva_info->latitude, xap_collaborator_ugv_pva_info->longitude, xap_collaborator_ugv_pva_info->altitude, xap_collaborator_ugv_pva_info->velN, xap_collaborator_ugv_pva_info->velE, xap_collaborator_ugv_pva_info->velD, xap_collaborator_ugv_pva_info->roll, xap_collaborator_ugv_pva_info->pitch, xap_collaborator_ugv_pva_info->yaw, xap_collaborator_ugv_pva_info->poseValid, xap_collaborator_ugv_pva_info->velValid, xap_collaborator_ugv_pva_info->attValid, xap_collaborator_ugv_pva_info->isTarget);
}

/**
 * @brief Send a xap_collaborator_ugv_pva_info message
 * @param chan MAVLink channel to send the message
 *
 * @param time_boot_ms [ms] Timestamp (milliseconds since system boot)
 * @param ID   UGV ID. 
 * @param latitude   Latitude, 1e7 deg, WGS-84. 
 * @param longitude   Longitude, 1e7 deg, WGS-84. 
 * @param altitude   Altitude, 1e3 m, WGS-84. 
 * @param velN   North speed, m/s. 
 * @param velE   East speed, m/s. 
 * @param velD   Down speed, m/s. 
 * @param roll   Roll angle, rad. 
 * @param pitch   Pitch angle, rad. 
 * @param yaw   Yaw angle `(heading), rad. 
 * @param poseValid   The sign of position info valid. 
 * @param velValid   The sign of velocity info valid. 
 * @param attValid   The sign of attitude info valid. 
 * @param isTarget   The sign of target. 
 */
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS

static inline void mavlink_msg_xap_collaborator_ugv_pva_info_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t ID, int32_t latitude, int32_t longitude, int32_t altitude, float velN, float velE, float velD, float roll, float pitch, float yaw, uint8_t poseValid, uint8_t velValid, uint8_t attValid, uint8_t isTarget)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_LEN];
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_int32_t(buf, 4, latitude);
    _mav_put_int32_t(buf, 8, longitude);
    _mav_put_int32_t(buf, 12, altitude);
    _mav_put_float(buf, 16, velN);
    _mav_put_float(buf, 20, velE);
    _mav_put_float(buf, 24, velD);
    _mav_put_float(buf, 28, roll);
    _mav_put_float(buf, 32, pitch);
    _mav_put_float(buf, 36, yaw);
    _mav_put_uint8_t(buf, 40, ID);
    _mav_put_uint8_t(buf, 41, poseValid);
    _mav_put_uint8_t(buf, 42, velValid);
    _mav_put_uint8_t(buf, 43, attValid);
    _mav_put_uint8_t(buf, 44, isTarget);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO, buf, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_MIN_LEN, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_LEN, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_CRC);
#else
    mavlink_xap_collaborator_ugv_pva_info_t packet;
    packet.time_boot_ms = time_boot_ms;
    packet.latitude = latitude;
    packet.longitude = longitude;
    packet.altitude = altitude;
    packet.velN = velN;
    packet.velE = velE;
    packet.velD = velD;
    packet.roll = roll;
    packet.pitch = pitch;
    packet.yaw = yaw;
    packet.ID = ID;
    packet.poseValid = poseValid;
    packet.velValid = velValid;
    packet.attValid = attValid;
    packet.isTarget = isTarget;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO, (const char *)&packet, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_MIN_LEN, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_LEN, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_CRC);
#endif
}

/**
 * @brief Send a xap_collaborator_ugv_pva_info message
 * @param chan MAVLink channel to send the message
 * @param struct The MAVLink struct to serialize
 */
static inline void mavlink_msg_xap_collaborator_ugv_pva_info_send_struct(mavlink_channel_t chan, const mavlink_xap_collaborator_ugv_pva_info_t* xap_collaborator_ugv_pva_info)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    mavlink_msg_xap_collaborator_ugv_pva_info_send(chan, xap_collaborator_ugv_pva_info->time_boot_ms, xap_collaborator_ugv_pva_info->ID, xap_collaborator_ugv_pva_info->latitude, xap_collaborator_ugv_pva_info->longitude, xap_collaborator_ugv_pva_info->altitude, xap_collaborator_ugv_pva_info->velN, xap_collaborator_ugv_pva_info->velE, xap_collaborator_ugv_pva_info->velD, xap_collaborator_ugv_pva_info->roll, xap_collaborator_ugv_pva_info->pitch, xap_collaborator_ugv_pva_info->yaw, xap_collaborator_ugv_pva_info->poseValid, xap_collaborator_ugv_pva_info->velValid, xap_collaborator_ugv_pva_info->attValid, xap_collaborator_ugv_pva_info->isTarget);
#else
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO, (const char *)xap_collaborator_ugv_pva_info, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_MIN_LEN, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_LEN, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_CRC);
#endif
}

#if MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
  This varient of _send() can be used to save stack space by re-using
  memory from the receive buffer.  The caller provides a
  mavlink_message_t which is the size of a full mavlink message. This
  is usually the receive buffer for the channel, and allows a reply to an
  incoming message with minimum stack space usage.
 */
static inline void mavlink_msg_xap_collaborator_ugv_pva_info_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan,  uint32_t time_boot_ms, uint8_t ID, int32_t latitude, int32_t longitude, int32_t altitude, float velN, float velE, float velD, float roll, float pitch, float yaw, uint8_t poseValid, uint8_t velValid, uint8_t attValid, uint8_t isTarget)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char *buf = (char *)msgbuf;
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_int32_t(buf, 4, latitude);
    _mav_put_int32_t(buf, 8, longitude);
    _mav_put_int32_t(buf, 12, altitude);
    _mav_put_float(buf, 16, velN);
    _mav_put_float(buf, 20, velE);
    _mav_put_float(buf, 24, velD);
    _mav_put_float(buf, 28, roll);
    _mav_put_float(buf, 32, pitch);
    _mav_put_float(buf, 36, yaw);
    _mav_put_uint8_t(buf, 40, ID);
    _mav_put_uint8_t(buf, 41, poseValid);
    _mav_put_uint8_t(buf, 42, velValid);
    _mav_put_uint8_t(buf, 43, attValid);
    _mav_put_uint8_t(buf, 44, isTarget);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO, buf, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_MIN_LEN, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_LEN, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_CRC);
#else
    mavlink_xap_collaborator_ugv_pva_info_t *packet = (mavlink_xap_collaborator_ugv_pva_info_t *)msgbuf;
    packet->time_boot_ms = time_boot_ms;
    packet->latitude = latitude;
    packet->longitude = longitude;
    packet->altitude = altitude;
    packet->velN = velN;
    packet->velE = velE;
    packet->velD = velD;
    packet->roll = roll;
    packet->pitch = pitch;
    packet->yaw = yaw;
    packet->ID = ID;
    packet->poseValid = poseValid;
    packet->velValid = velValid;
    packet->attValid = attValid;
    packet->isTarget = isTarget;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO, (const char *)packet, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_MIN_LEN, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_LEN, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_CRC);
#endif
}
#endif

#endif

// MESSAGE XAP_COLLABORATOR_UGV_PVA_INFO UNPACKING


/**
 * @brief Get field time_boot_ms from xap_collaborator_ugv_pva_info message
 *
 * @return [ms] Timestamp (milliseconds since system boot)
 */
static inline uint32_t mavlink_msg_xap_collaborator_ugv_pva_info_get_time_boot_ms(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  0);
}

/**
 * @brief Get field ID from xap_collaborator_ugv_pva_info message
 *
 * @return   UGV ID. 
 */
static inline uint8_t mavlink_msg_xap_collaborator_ugv_pva_info_get_ID(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  40);
}

/**
 * @brief Get field latitude from xap_collaborator_ugv_pva_info message
 *
 * @return   Latitude, 1e7 deg, WGS-84. 
 */
static inline int32_t mavlink_msg_xap_collaborator_ugv_pva_info_get_latitude(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int32_t(msg,  4);
}

/**
 * @brief Get field longitude from xap_collaborator_ugv_pva_info message
 *
 * @return   Longitude, 1e7 deg, WGS-84. 
 */
static inline int32_t mavlink_msg_xap_collaborator_ugv_pva_info_get_longitude(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int32_t(msg,  8);
}

/**
 * @brief Get field altitude from xap_collaborator_ugv_pva_info message
 *
 * @return   Altitude, 1e3 m, WGS-84. 
 */
static inline int32_t mavlink_msg_xap_collaborator_ugv_pva_info_get_altitude(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int32_t(msg,  12);
}

/**
 * @brief Get field velN from xap_collaborator_ugv_pva_info message
 *
 * @return   North speed, m/s. 
 */
static inline float mavlink_msg_xap_collaborator_ugv_pva_info_get_velN(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  16);
}

/**
 * @brief Get field velE from xap_collaborator_ugv_pva_info message
 *
 * @return   East speed, m/s. 
 */
static inline float mavlink_msg_xap_collaborator_ugv_pva_info_get_velE(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  20);
}

/**
 * @brief Get field velD from xap_collaborator_ugv_pva_info message
 *
 * @return   Down speed, m/s. 
 */
static inline float mavlink_msg_xap_collaborator_ugv_pva_info_get_velD(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  24);
}

/**
 * @brief Get field roll from xap_collaborator_ugv_pva_info message
 *
 * @return   Roll angle, rad. 
 */
static inline float mavlink_msg_xap_collaborator_ugv_pva_info_get_roll(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  28);
}

/**
 * @brief Get field pitch from xap_collaborator_ugv_pva_info message
 *
 * @return   Pitch angle, rad. 
 */
static inline float mavlink_msg_xap_collaborator_ugv_pva_info_get_pitch(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  32);
}

/**
 * @brief Get field yaw from xap_collaborator_ugv_pva_info message
 *
 * @return   Yaw angle `(heading), rad. 
 */
static inline float mavlink_msg_xap_collaborator_ugv_pva_info_get_yaw(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  36);
}

/**
 * @brief Get field poseValid from xap_collaborator_ugv_pva_info message
 *
 * @return   The sign of position info valid. 
 */
static inline uint8_t mavlink_msg_xap_collaborator_ugv_pva_info_get_poseValid(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  41);
}

/**
 * @brief Get field velValid from xap_collaborator_ugv_pva_info message
 *
 * @return   The sign of velocity info valid. 
 */
static inline uint8_t mavlink_msg_xap_collaborator_ugv_pva_info_get_velValid(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  42);
}

/**
 * @brief Get field attValid from xap_collaborator_ugv_pva_info message
 *
 * @return   The sign of attitude info valid. 
 */
static inline uint8_t mavlink_msg_xap_collaborator_ugv_pva_info_get_attValid(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  43);
}

/**
 * @brief Get field isTarget from xap_collaborator_ugv_pva_info message
 *
 * @return   The sign of target. 
 */
static inline uint8_t mavlink_msg_xap_collaborator_ugv_pva_info_get_isTarget(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  44);
}

/**
 * @brief Decode a xap_collaborator_ugv_pva_info message into a struct
 *
 * @param msg The message to decode
 * @param xap_collaborator_ugv_pva_info C-struct to decode the message contents into
 */
static inline void mavlink_msg_xap_collaborator_ugv_pva_info_decode(const mavlink_message_t* msg, mavlink_xap_collaborator_ugv_pva_info_t* xap_collaborator_ugv_pva_info)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    xap_collaborator_ugv_pva_info->time_boot_ms = mavlink_msg_xap_collaborator_ugv_pva_info_get_time_boot_ms(msg);
    xap_collaborator_ugv_pva_info->latitude = mavlink_msg_xap_collaborator_ugv_pva_info_get_latitude(msg);
    xap_collaborator_ugv_pva_info->longitude = mavlink_msg_xap_collaborator_ugv_pva_info_get_longitude(msg);
    xap_collaborator_ugv_pva_info->altitude = mavlink_msg_xap_collaborator_ugv_pva_info_get_altitude(msg);
    xap_collaborator_ugv_pva_info->velN = mavlink_msg_xap_collaborator_ugv_pva_info_get_velN(msg);
    xap_collaborator_ugv_pva_info->velE = mavlink_msg_xap_collaborator_ugv_pva_info_get_velE(msg);
    xap_collaborator_ugv_pva_info->velD = mavlink_msg_xap_collaborator_ugv_pva_info_get_velD(msg);
    xap_collaborator_ugv_pva_info->roll = mavlink_msg_xap_collaborator_ugv_pva_info_get_roll(msg);
    xap_collaborator_ugv_pva_info->pitch = mavlink_msg_xap_collaborator_ugv_pva_info_get_pitch(msg);
    xap_collaborator_ugv_pva_info->yaw = mavlink_msg_xap_collaborator_ugv_pva_info_get_yaw(msg);
    xap_collaborator_ugv_pva_info->ID = mavlink_msg_xap_collaborator_ugv_pva_info_get_ID(msg);
    xap_collaborator_ugv_pva_info->poseValid = mavlink_msg_xap_collaborator_ugv_pva_info_get_poseValid(msg);
    xap_collaborator_ugv_pva_info->velValid = mavlink_msg_xap_collaborator_ugv_pva_info_get_velValid(msg);
    xap_collaborator_ugv_pva_info->attValid = mavlink_msg_xap_collaborator_ugv_pva_info_get_attValid(msg);
    xap_collaborator_ugv_pva_info->isTarget = mavlink_msg_xap_collaborator_ugv_pva_info_get_isTarget(msg);
#else
        uint8_t len = msg->len < MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_LEN? msg->len : MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_LEN;
        memset(xap_collaborator_ugv_pva_info, 0, MAVLINK_MSG_ID_XAP_COLLABORATOR_UGV_PVA_INFO_LEN);
    memcpy(xap_collaborator_ugv_pva_info, _MAV_PAYLOAD(msg), len);
#endif
}
